import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from '@/store'
import NavPage from '@/components/Navigate'
import Pagination from '@/components/Pagination'
import VueLazyload from 'vue-lazyload'
import load from '@/assets/aa.gif'

// 启动mock服务器
import '@/mockServer'

// 统一引入轮播图样式
import 'swiper/css/swiper.css'

Vue.config.productionTip = false
// 注册全局组件
Vue.component(NavPage.name,NavPage)
Vue.component(Pagination.name,Pagination)
// 注册图片懒加载
Vue.use(VueLazyload,{
  loading:load
})

new Vue({
  render: h => h(App),
  router,
  // 当删除了面包屑中的关键词后，搜索框中最好也要将显示的关键词清除掉，此时需要用到全局事件总线
  beforeCreate(){
    Vue.prototype.$eventBus = this
  },
  store
}).$mount('#app')
